<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Vue 示例</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for = "book in books">{{ book.name }}</li>
        </ul>
    </div>
    <div id="yourname">
        <input type="text" v-model="name" placeholder="请输入你的名字"/>
        <h1>你好，{{ name }}</h1>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script>
        new Vue({
            el:"#app",
            data:{
                books:[
                    { name : '《Vue.js实战》'},
                    { name : '《JavaScript语言精粹》'},
                    { name : '《JavaScript高级程序》' }
                ]
            }
        })
        var name = new Vue({
            el:"#yourname",
            data:{
                name:""
            }
        })
        var myData ={
            a:1
        }
    </script>
</body>
</html>